package erwiki.part.pages;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;

import erwiki.api.pages.PageManager;

public class PageManagerPreferencePage extends FieldEditorPreferencePage {
	private static final long serialVersionUID = 1L;

	/**
	 * Create the preference page.
	 */
	public PageManagerPreferencePage() {
		super(FLAT);
	}

	/**
	 * Create contents of the preference page.
	 */
	@Override
	protected void createFieldEditors() {
		// Create the field editors
		addField(new StringFieldEditor(PageManager.Prefs.PAGE_PROVIDER, "Page provider Id", -1,
				StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent()));

		addField(new BooleanFieldEditor(PageManager.Prefs.ALLOW_CREATION_OF_EMPTY_PAGES, "Allow create empty pages",
				BooleanFieldEditor.DEFAULT, getFieldEditorParent()));
	}

}
